package com.probox.order.api.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.probox.common.core.annotation.Excel;
import com.probox.common.core.enums.DeliverMethodEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 开票信息对象 order_invoice
 *
 * @author hds
 * @date 2021-06-07
 */
@Data
@ApiModel(description="开票信息")
public class OrderInvoiceVo implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    private Long recordUid;
    @Excel(name = "平台ID")
    @ApiModelProperty(value = "平台ID(平台ID)")
    private Long platformUid;
    /** 订单ID */
    @Excel(name = "订单ID")
    @ApiModelProperty(value = "订单ID(订单ID)")
    private Long orderUid;

    /** 发票代码 */
    @Excel(name = "发票代码")
    @ApiModelProperty(value = "发票代码(发票代码)")
    private String invoiceNo;

    /** 发票号码 */
    @Excel(name = "发票号码")
    @ApiModelProperty(value = "发票号码(发票号码)")
    private String invoiceCode;

    /** 发票图片 */
    @Excel(name = "发票图片")
    @ApiModelProperty(value = "发票图片(发票图片)")
    private String invoiceUrl;

    /** 开票单位名称 */
    @Excel(name = "开票单位名称")
    @ApiModelProperty(value = "开票单位名称(开票单位名称)")
    private String sellerName;

    /** 配送方式 express快递、ziti自提、logistics物流 */
    @Excel(name = "配送方式 express快递、ziti自提、logistics物流")
    @ApiModelProperty(value = "配送方式 express快递、ziti自提、logistics物流(配送方式 express快递、ziti自提、logistics物流)")
    private String deliverMethod;

    /** 数据状态 */
    @Excel(name = "数据状态")
    @ApiModelProperty(value = "数据状态(数据状态)")
    private String dataStatus;

    /** $column.columnComment */
    @Excel(name = "数据状态")
    @ApiModelProperty(value = "数据状态($column.readConverterExp())")
    private Long updateUser;

    /** $column.columnComment */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "数据状态" , width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "数据状态($column.readConverterExp())")
    private Date updateTime;

    /** 名称 */
    @Excel(name = "名称")
    @ApiModelProperty(value = "名称(名称)")
    private String updateName;

    public String getDeliverMethodName(){
        return DeliverMethodEnum.getNameByKey(deliverMethod);
    }


    private String deliverPhone;

    private String deliverEmail;
}
